/**
 * @author  zhanshi Liu
 * @date    2020/04/15
 * @website www.jhmsona.cn
 */
var vm = new Vue({
    el:'#vm',
    data:{
        tableData:[],
        currentPage:1,
        count:0,
        excData:{},
        title:undefined,
        dialogFormVisible: false,
        formLabelWidth: '80px',
        form:{
            operIp:undefined,
            operUserName:undefined,
            page:1,
            limit:10,
        }
    },
    created:function (){
        this.getExc();
    },
    mounted:function(){

    },
    methods:{
        getExc(){
            $.ajax({
                url:'/log/exc/list',
                type:'get',
                dataType:"json",
                data:{
                    data:JSON.stringify(this.form)
                },
                success:(res)=>{
                    this.tableData = res.data;
                    this.count=res.count;
                }
            })
        },
        search(){
            this.getExc();
        },
        reset(form1){
            this.$refs[form1].resetFields()
        },
        handleSizeChange(val) {
            this.form.limit = val;
            this.getExc();
        },
        handleCurrentChange(val) {
            this.form.page = val;
            this.getExc();
        },
        detail(row){
            this.title="异常明细";
            this.dialogFormVisible=true;
            axios.get('/log/exc/info',{
                params:{
                    excId:row.excId
                }
            }).then(res=> {
                console.log(res);
                this.excData = res.data.data;
            })
        }
    }
})

